﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Guest.Master" AutoEventWireup="True"
    CodeBehind="Read.aspx.cs" Inherits="ScrumLite.WebUx.RequestsViews.Read" %>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<% 
    Ajax.Initialize();
    Ajax.RegisterScript("~/Scripts/AjaxAction.js");    
    Ajax.RegisterScript("~/Scripts/lib.prototype.js");
    Ajax.RegisterScript("~/Scripts/lib.event.mixins.js");
    Ajax.RegisterScript("~/Scripts/lib.keyboard.js");
    Ajax.RegisterScript("~/Scripts/lib.caretaker.js");
    Ajax.RegisterScript("~/Scripts/lib.validation.js");
    Ajax.RegisterScript("~/Scripts/lib.datagrid.js");
    Ajax.RegisterScript("~/Scripts/lib.datagrid.commands.js");    
%>
    <h1><%=ViewData.ProjectName%></h1>
    <hr />
     <div id="progressBar" class="off">
        <span>Loading please wait...</span>
    </div>
    <br />
    <div id="backlog">
    <% 
        //TODO: this hack is because of latest changes in Workareas
        // Please check what are we doing with workareas!!!!!
        if (ViewData.Mode.ToUpperInvariant() == "ALL")
       {
           Html.RenderPartial(ViewData.BacklogView, new ScrumLite.WebUx.Models.ReadAllViewData 
                                                        { ProjectId = ViewData.ProjectId,
                                                          WorkAreaName = ViewData.WorkAreaName,
                                                          GridPage = ViewData.GridPage
                                                        }); 
       }
       else
       {
           Html.RenderPartial(ViewData.BacklogView, ViewData.ProjectId);  
       }
        %>
    </div>
    
<% Ajax.RenderScripts(); %>
</asp:Content>
